package com.cet.designpatterns.proxy.staticproxy;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-15 09:53
 **/
public class TeacherDaoProxy implements ITeacherDao {

    private ITeacherDao target;

    public TeacherDaoProxy(ITeacherDao target) {
        this.target = target;
    }

    @Override
    public void teach() {
        System.out.println("上课，老师好~~~");
        target.teach();
        System.out.println("下课，老师再见~~~");
    }
}
